package com.ljf.utility.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.ljf.common.model.BasisModel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

import java.util.Date;

/**
 * 编译历史表对象  utility_dat_compile_history
 *
 * @author LJF
 * @since 2025-08-30
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("编译历史表")
@EqualsAndHashCode(callSuper = true)
@TableName("utility_dat_compile_history")
public class UtilityDatCompileHistory extends BasisModel {

	private static final long serialVersionUID = 1L;

	/**
	 * Java类型: Long
	 * 数据库类型: bigint
	 * 注释: ID
	 * {@link UtilityDatCompileHistory#COL_ID}
	 */
	@JsonProperty("id")
	@ApiModelProperty(value = "ID")
	@TableId(value="id", type= IdType.AUTO)
	private Long id;

	/**
	 * Java类型: String
	 * 数据库类型: char(9)
	 * 注释: 编码
	 * {@link UtilityDatCompileHistory#COL_CODE}
	 */
	@TableField("code")
	@JsonProperty("code")
	@ApiModelProperty(value = "编码")
	private String code;

	/**
	 * Java类型: Integer
	 * 数据库类型: int
	 * 注释: 版本编码
	 * {@link UtilityDatCompileHistory#COL_VERSION_CODE}
	 */
	@TableField("version_code")
	@JsonProperty("versionCode")
	@ApiModelProperty(value = "版本编码")
	private Integer versionCode;

	/**
	 * Java类型: Date
	 * 数据库类型: datetime
	 * 注释: 操作时间
	 * {@link UtilityDatCompileHistory#COL_OPERATION_TIME}
	 */
	@TableField("operation_time")
	@JsonProperty("operationTime")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	@ApiModelProperty(value = "操作时间")
	private Date operationTime;

	/**
	 * Java类型: Integer
	 * 数据库类型: tinyint
	 * 注释: 执行结果(1:成功;2:失败)
	 * {@link UtilityDatCompileHistory#COL_EXECUTION_RESULT}
	 * {@link com.ljf.utility.enums.UtilityDatCompileHistoryExecutionResultEnum}
	 */
	@TableField("execution_result")
	@JsonProperty("executionResult")
	@ApiModelProperty(value = "执行结果")
	private Integer executionResult;

	/**
	 * Java类型: Integer
	 * 数据库类型: int unsigned
	 * 注释: 耗时(ms)
	 * {@link UtilityDatCompileHistory#COL_TIME_CONSUME}
	 */
	@TableField("time_consume")
	@JsonProperty("timeConsume")
	@ApiModelProperty(value = "耗时(ms)")
	private Integer timeConsume;


	/**
	 * ID
	 * {@link UtilityDatCompileHistory#id}
	 */
	public static final String COL_ID = "id";
	/**
	 * 编码
	 * {@link UtilityDatCompileHistory#code}
	 */
	public static final String COL_CODE = "code";
	/**
	 * 版本编码
	 * {@link UtilityDatCompileHistory#versionCode}
	 */
	public static final String COL_VERSION_CODE = "version_code";
	/**
	 * 操作时间
	 * {@link UtilityDatCompileHistory#operationTime}
	 */
	public static final String COL_OPERATION_TIME = "operation_time";
	/**
	 * 执行结果(1:成功;2:失败)
	 * {@link UtilityDatCompileHistory#executionResult}
	 */
	public static final String COL_EXECUTION_RESULT = "execution_result";
	/**
	 * 耗时(ms)
	 * {@link UtilityDatCompileHistory#timeConsume}
	 */
	public static final String COL_TIME_CONSUME = "time_consume";

}
